Creating Development Environments with Vagrant Second Edition by 2015

Creating Development Environments with Vagrant Second Edition by 2015

Author:2015
Language: eng
Format: epub
Publisher: Packt Publishing


Managing cron

The cron module (http://docs.ansible.com/cron_module.html) lets us use Ansible to manage cron jobs, which we need to run on the machine. We provide a name (which is a required parameter), in this case, web_cron, the command to run, the user to run the command, and the times at which to run the command, as shown in the following code:

- name: Run some cron cron: name="web_cron" hour="1-4" minute="0,30" job="/usr/bin/php /vagrant/cron.php"

Ansible provides us with various different configuration options to define the times at which a cron should be run. These include:

Hour: This value is between 0 and 23 inclusive

Minute: This value is between 0 and 59 inclusive

Month: This value is between 1 and 12 inclusive

Day: This value is between 1 and 31 inclusive

Weekday: This value is from Sunday (0) to Saturday (6)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.